package com.yunhe.common.model.authority;

import com.yunhe.common.model.base.Area;

import java.io.Serializable;
import java.util.List;

/**
 * 单位对象
 * @author liuronglei
 */
public class Firm implements Comparable<Firm>, Serializable {

    private Long id;
    private String name;
    private Long code;
    private String title;
    private String systemTitle;
    private String communicationCode;
    private List<Firm> children;
    private Boolean root = false;
    private String activity = "1";
    private String sn;
    private Area area;
    private HomePage homePage;
    private String logAndLat;
    private List<Station> stations;

    @Override
    public int compareTo(Firm o) {
        if (this.sn == null) {
            return -1;
        } else if (o.getSn() == null) {
            return 1;
        }
        return this.sn.compareTo(o.getSn());
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSystemTitle() {
        return systemTitle;
    }

    public void setSystemTitle(String systemTitle) {
        this.systemTitle = systemTitle;
    }

    public String getCommunicationCode() {
        return communicationCode;
    }

    public void setCommunicationCode(String communicationCode) {
        this.communicationCode = communicationCode;
    }

    public List<Firm> getChildren() {
        return children;
    }

    public void setChildren(List<Firm> children) {
        this.children = children;
    }

    public Boolean getRoot() {
        return root;
    }

    public void setRoot(Boolean root) {
        this.root = root;
    }

    public String getActivity() {
        return activity;
    }

    public void setActivity(String activity) {
        this.activity = activity;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Area getArea() {
        return area;
    }

    public void setArea(Area area) {
        this.area = area;
    }

    public HomePage getHomePage() {
        return homePage;
    }

    public void setHomePage(HomePage homePage) {
        this.homePage = homePage;
    }

    public String getLogAndLat() {
        return logAndLat;
    }

    public void setLogAndLat(String logAndLat) {
        this.logAndLat = logAndLat;
    }

    public List<Station> getStations() {
        return stations;
    }

    public void setStations(List<Station> stations) {
        this.stations = stations;
    }
}
